package com.cskaoyan.controller.wx.zjh;

import com.cskaoyan.module.bean.BaseRespVo;
import com.cskaoyan.service.wx.zjh.WxTopicService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created with IntelliJ IDEA.
 *
 * @Description:
 * @Author: 周佳豪
 * @Date: 2022/04/11/17:31
 */
@RestController
@RequestMapping("wx")
public class WXTopicController {

    @Autowired
    WxTopicService topicService;

    @GetMapping("topic/list")
    public BaseRespVo topicList(Integer page, Integer limit) {
        BaseRespVo baseRespVo = topicService.topicList(page, limit);
        return baseRespVo;
    }
    @GetMapping("topic/related")
    public BaseRespVo topicRelated(Integer id) {
        BaseRespVo baseRespVo = topicService.topicList(1, 4);
        return baseRespVo;
    }
    @GetMapping("topic/detail")
    public BaseRespVo topicDetail(Integer id) {
        BaseRespVo baseRespVo = topicService.topicDetail(id);

        return baseRespVo;
    }

}
